﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 原型模式
{
    /// <summary>
    /// 简历
    /// </summary>
    class Resume : ICloneable
    {
        string name;
        string sex;
        string age;
        string timeArea;
        string company;
        public Resume(string name)
        {
            this.name = name;
        }
        public void SetPersonalInfo(string sex, string age)
        {
            this.sex = sex;
            this.age = age;
        }
        public void SetWorkExperience(string timeArea, string company)
        {
            this.timeArea = timeArea;
            this.company = company;
        }
        public void Display()
        {
            Console.WriteLine("{0} {1} {2}", name, sex, age);
            Console.WriteLine("工作经历：{0} {1}", timeArea, company);
        }
        public object Clone()
        {
            return this.MemberwiseClone();//创建当前object的浅表副本
        }
    }
}
